<style>
	.panel-body.black{
		background-color: #000;
		color: #fff;
	}
</style>
<div class="panel panel-primary full">
	<div class="panel-heading">
		最新日志 <a href="#" class="btn btn-default btn-xs pull-right change-background"> 切换背景</a>
	</div>
	<div class="panel-body black">
		${log}
	</div>
</div>

<script>
    $('.change-background').on('click', function(e){
    	$(this).closest('.panel').find('.panel-body').toggleClass('black');
    })
    
    $(window).resize(function() {
        $('.panel.full>.panel-body').each(function() {
            var height = $(this).height();
            var top = $(this).offset().top;
            var footer = $(this).closest('.full').find('.panel-footer').height();
            footer = footer && footer > 0 ? footer + 12 : 0;
            var winHeight = $(window).height();
            var resetHeight = winHeight - top - footer - 40;
            if(resetHeight > 20 || height < resetHeight){
                $(this).height(resetHeight);
            }
        });
        // $('#results').height($(window).height() - $('#results').offset().top - 106);
    });
    setTimeout(function() { $(window).resize(); },200);
    </script>